{extend name="layout/base" /}
<!-- 标题 -->
{block name="title"}帮助中心{/block}
<!-- CSS -->
{block name="css"}
    <style type="text/css">
    </style>
{/block}
<!-- JS -->
{block name="js"}{/block}
<!-- 具体内容 -->
{block name="content"}
<h2 class="header-dividing">帮助中心 <small>Help</small></h2>

<div>
    <br>
    <label class="label label-primary label-badge"><i class="icon icon-check"></i></label>
</div>
{literal}
<h3>添加弹出框</h3>

<h4>必需属性</h4>
<blockquote>
    弹出框(模式)：data-toggle="modal" <br>
    弹出框(指向)：data-target="#modal-create" <br>
    表单地址：data-action="{:url('@admin/article/save')}" <br>
</blockquote>

<h4>html代码</h4>
<pre><?php 
    $html = <<<html
<a data-toggle="modal" data-target="#modal-create" data-action="{:url('@admin/article/save')}"> <i class="icon icon-plus"></i> 添加内容</a>
html;
    echo htmlentities($html);
?></pre>

<h3>修改弹出框</h3>
<h4>必需属性</h4>
<blockquote>
弹出框(模式)：data-toggle="modal" <br>
弹出框(指向)：data-target="#modal-create" <br>
数据地址：data-url="{:url('@admin/article/edit', 'id='.\$vo['article_id'])}" <br>
表单地址：data-action="{:url('@admin/article/update')}"
</blockquote>

<h4>html 代码</h4>
<pre><?php $html = <<<html
<a data-toggle="modal" data-target="#modal-create" data-url="{:url('@admin/article/edit', 'id='.\$vo['article_id'])}" data-action="{:url('@admin/article/update')}">修改</a>
html;
echo htmlentities($html);?>
</pre>

<h3>modal 代码</h3>
<blockquote>
form ID：id="form-modal-submit" <br>
modalID：id="modal-create" <br>
</blockquote>

<h4>html 代码</h4>
<pre><?php $html = <<<html
<form method="post" class="form-horizontal" id="form-modal-submit">
    <input type="hidden" name="article_id" id="article_id" value="0">
    <div class="modal fade" data-backdrop="static" id="modal-create">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">内容管理</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="article_title" class="col-sm-2 required" >标题</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" name="article_title" id="article_title" placeholder="标题" required>
                        </div>
                        <div class="col-sm-4"><p class="help-block with-errors"></p></div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
</form>
html;
echo htmlentities($html); ?></pre>

<h3>删除代码</h3>
<pre><?php $html = <<<html
<a class="delete" data-url="{:url('@admin/article/delete','id='.\$vo['manage_id'])}">删除</a>
html;
echo htmlentities($html); ?></pre>

<h3>批量删除</h3>
<pre><?php $html = <<<html
// 这里的表格使用了datatable插件
<button class="check-delete" type="button" data-url="{:url('@admin/manage/delete')}">删除帐号</button>
html;
echo htmlentities($html); ?></pre>

<h3>排序更新</h3>
<pre><?php $html = <<<html
<td><input type="number" class="form-control input-sm sort" data-url="{:url('@admin/site/param_sort')}" data-old-sort="{\$vo['param_sort']}" data-id="{\$vo['param_id']}" value="{\$vo['param_sort']}"></td>
html;
echo htmlentities($html); ?></pre>


{/literal}
{/block}